package com.study.controller;

import com.study.entity.Emp;
import com.study.entity.LoginInfo;
import com.study.entity.Result;
import com.study.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class LoginController {
    @Autowired
    private LoginService loginService;
    @PostMapping("/login")
    public Result login(@RequestBody Emp emp){
        LoginInfo loginInfo = loginService.login(emp);
        return Result.success(loginInfo);
    }
}
